<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="js/jquery-1.8.0.js"></script>
<script type="text/javascript" src="js/layer.js"></script>
<script type="text/javascript" src="js/jquery.cookie.js"></script>
<script type="text/javascript" src="js/layer.min.js"></script>
<title>Insert title here</title>
<style type="text/css">
a {
	text-transform: none;
	text-decoration: none;
}

a:hover {
	text-decoration: underline
}
</style>
<script type="text/javascript">
	function onProvinceChange(province) {

		var pid = province;
		$.cookie('pid', pid);
		//设置cookie的值
		$.cookie('pid', pid, {
			expires : 1460,
			path : '/',
			domain : 'ywm8.com',
			secure : true
		});

		$.ajax({
			type : "POST",
			url : "adminAction!getIndexUniv",
			data : ({
				pid : pid
			}),
			success : function(data) {
				$("#un").html($(data).find("#un").css("border", "0"));
				//$(data).find('body').html();
			}
		});
	}
	
	function writeCookie(uid) {
		$.cookie('uid', uid);
		//设置cookie的值
		$.cookie('uid', uid, {
			expires : 1460,
			path : '/',
			domain : 'ywm8.com',
			secure : true
		});
	}
</script>

</head>
<body>

	<div>
		<div style="width: 700px">
			<s:iterator value="list" var="provinces">
				<div style="display: inline;">
					<a
						href="javascript:onProvinceChange(<s:property value="#provinces.id" />)">
						<s:property value="#provinces.name" />
					</a>
				</div>
			</s:iterator>
		</div>

		<div id="un" style="width: 700px">
			<s:iterator value="Ulist" var="univs">
				<div style="display: inline;">
					<a href="javascript:writeCookie(<s:property value="#univs.id" />)">
						<s:property value="#univs.name" />|
					</a>
				</div>
			</s:iterator>
		</div>

		<div id="school" style="width: 700px">
			<s:iterator value="shops" var="sps">
				<div style="display: inline;">
					<a href="javascript:writeCookie2(<s:property value="#sps.aid" />)">
						${sps.school} <s:property value="#sps.id" />|
					</a>
				</div>
			</s:iterator>
		</div>
	</div>
</body>
</html>